<template>
  <div>
    <h1>Async</h1>
    <div v-for="(item, index) in data" :key="index">
      {{ item.name }}
    </div>
  </div>
</template>
<script setup lang="ts">
import { axios } from './utils/getData'
// 该组件使用异步请求数据，为异步组件
const data = await axios('/data.json')
console.log(data)
</script>
<style scoped></style>
